<!--
  Generated template for the BusinessFoodOrderPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>订单</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>

  <ion-refresher (ionRefresh)="doRefresh()">
    <ion-refresher-content></ion-refresher-content>
  </ion-refresher>
  <div *ngIf=" orderList.length <=0" class="empty">
  <page-empty></page-empty>
  </div>
  <div *ngIf=" orderList.length > 0">
     <div class="container-card" *ngFor="let lst of orderList" [ngClass]="lst.statusName === '已结算' ? 'finish':'warning'">
    <div class="header-card">
      <div class="header-left-container">
        <div class="header-left">
          {{lst.floorName}}{{lst.tableName}}
        </div>

      </div>
      <div class="header-right" [ngClass]="lst.statusName === '已结算' ? 'finish':'warning'">{{lst.statusName}}</div>
    </div>
    <hr class="line"/>
    <div class="content-card">
      <div class="food-container" *ngFor="let food of lst.orderDetail">
        <div class="food-cont-del">{{food.foodname}}
          <div *ngIf="food.del == 1">
              <span> &nbsp; 已退</span>
          </div>
        </div>

        <div>{{food.num}}</div>
      </div>
    </div>
    <hr class="line"/>
    <div class="container-mon">
      <span>总价：{{lst.totalprice}}  优惠：{{lst.discountrate}}  应收：{{lst.totalprice}}  实收：{{lst.realpay}}</span>
    </div>
    <hr class="line"/>
    <div class="container-last">
      <div>支付方式：{{lst.payTypeName}}        </div>
      <div>{{lst.trandate}}</div>
    </div>
    <div *ngIf="lst.statusName == '未结算'">
      <hr class="line"/>
      <div class="button-pay">
        <div></div>
        <!--<button ion-button (click)="cashDetail(lst.orderno,lst.tableName,lst.totalprice)">去结算</button>-->
      </div>
    </div>
  </div>
  </div>
  <ion-infinite-scroll (ionInfinite)="$event.waitFor(doInfinite())">
    <ion-infinite-scroll-content loadingSpinner="bubbles"
                                 loadingText="正在加载下一页...">>

    </ion-infinite-scroll-content>
  </ion-infinite-scroll>
  <div style="text-align: center;color: gray;" *ngIf="page.isLastPage">- - - - - - - - - - 我是有底线的哦 - - - - - - - - - -</div>


</ion-content>
